記事追加 "スコープと名前ルックアップの仕様整理 [P1787R6]" (patch for issue #1023)#1617
Open
rotarymars wants to merge 2 commits intocpprefjp:masterfrom
Open
記事追加 "スコープと名前ルックアップの仕様整理 [P1787R6]" (patch for issue #1023)#1617rotarymars wants to merge 2 commits intocpprefjp:masterfrom
rotarymars wants to merge 2 commits intocpprefjp:masterfrom
Conversation
Contributor
|
⚡ プレビュー (HTML) (更新時刻: 2026-04-26 07:30:32 JST) 変更記事一覧3件の記事が変更されました。 ※ソース (.md) に直接変更のあった記事を列挙しています。グローバル修飾や変換規則の変更による変化は考慮していません。 |
Member
Author
akinomyoga
reviewed
Apr 26, 2026
Member
akinomyoga
left a comment
There was a problem hiding this comment.
P1787R6 の中まで確認していませんが、ぱっと見た感じのコメントです。
| | スコープ (scope) | 名前を識別するための領域 | 「declarative region」と「scope」の使い分けを廃止し、「scope」に一本化 | | ||
| | 直近スコープ (immediate scope) | プログラム上のある点を含む最小のスコープ | 暗黙的に使われていた概念を明示化 | | ||
| | 親スコープ (parent scope) | あるスコープを (それ自身を除いて) 含む最小のスコープ | 入れ子構造の記述を明確化 | | ||
| | 居住する (inhabit) | 宣言が、自身のローカスにおける直近スコープに属すること | 宣言の所在の表現を明確化 | |
Member
There was a problem hiding this comment.
訳語の根拠はどれぐらいありますか?
- "居住する (inhabit)" … 典拠ありますか? なければもっと自然なものを考える余地があるかも。個人的主観だと生息の方が未だましのような気がしますが、もっと良いものがありそうな気がします。
- "結合する (bind)" … プログラミング言語の文脈では bind は「束縛する」とするのが慣習に思います
- "単一探索 (single search)" … 「探索」は JIS C++ で「ルックアップ」の訳語として使われています。この PR では search = 探索、lookup = ルックアップ にしていることが気になります (皮肉にも用語の混用を解決する提案文書の解説で用語の混用を導入しているような… ただ、チェックしたことがないだけでこういう訳語の衝突は既に起こっているかもしれません。)
- 追記: "構成名 (component name)" ... これもしっくりこないです
|
|
||
|
|
||
|
|
||
| ## 観測可能な振る舞いの変更 |
Member
There was a problem hiding this comment.
これは observable behavior のことですか? これは明確に定義された語で、JIS C++ は "外から見た動作" としています。未定義の動作などと同じ "behavior" なので、少なくとも "振る舞い" ではなくて "動作" の方が良い気がします。
検索すると既に色々分かれているみたいですが…
Member
|
概要のところは、過去の経緯とかは置いておいて (後述にして)、C++23でこういう機能が入った、という説明にしてくださいませ。 |
akinomyoga
reviewed
Apr 26, 2026
| @@ -0,0 +1,167 @@ | |||
| # スコープと名前ルックアップの仕様整理 [P1787R6] | |||
Member
There was a problem hiding this comment.
"名前ルックアップ" 自体この P1787R6 の言及より前には存在していないみたいです
- Code search results - "名前ルックアップ" 2記事。共に今回の記事に対するリンク
- Code search results - "名前探索" 14記事
Member
There was a problem hiding this comment.
私が書いたタイトルに引きずられてしまったところがあるかもしれませんが、私が概要だけ調べて書いたタイトルは、実態を調べてもらった上で摘便かえてもらってだいじょうぶです
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close #1023